import random

from django.shortcuts import render
from django.http import HttpResponse


def show_article(request, year, month, a, b):
    print('extra arguments: a: %s, b: %s' % (a, b))

    total = random.randint(10, 20)
    lines = []
    for i in range(total):
        lines.append('<li>article %s</li>' % i)
    html = '<p>%s-%s</p>' % (year, month)
    html += '<ul>' + '\n'.join(lines) + '</ul>'

    return HttpResponse(html)


def hello(request):
    return HttpResponse('hello world.')
